package com.sicong.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sicong.admin.entity.Role;
import com.sicong.admin.mapper.RoleMapper;
import com.sicong.admin.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author
 * @since 2020-11-25
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    /**
     * 通过用户id查询角色信息
     * @param userId 用户id
     * @return       角色集合
     */
    @Override
    public List<Long> findRolesByUserId(Long userId) {
        return baseMapper.findRolesByUserId(userId);
    }

}
